'use strict';
const Controller = require('egg').Controller;

class HomeController extends Controller {
    async index() {
        const { ctx, app } = this;

        let obj = { 
        	title: '生有生，大道自有徵（zhēng）。死无死，何用百年算。掩筝罢弦听渊默，苍茫天地何解莲。',
        	query: ctx.query,
        	params: ctx.params,
        	env: app.config.env
        }
        app.cache.set('myKey',obj)
        console.log('=======早起鸟儿一脸懵逼=======',ctx)

        ctx.body = app.cache.get('myKey')
        ctx.status = 201;
    }
}

module.exports = HomeController;
